﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BookStore.Admin.Models;
using System.Data;
namespace BookStore.Admin.Controllers
{
    [HandleError]
    public class HeadController : Controller
    {
        public ActionResult Index()
        {
            UsersModel user = new UsersModel();
            if (Session["Session_Admin"] != null)
            {
                ViewData["isLogin"] = 1;
                ViewData["user_name"] = user.getUserNamebyID(Convert.ToInt32(Session["Session_Admin"]));
                ViewData["type"] = user.CheckAccount(Convert.ToInt32(Session["Session_Admin"]));
            }
            else
                ViewData["isLogin"] = 0;

            
            return View();
        }
    }
}
